package com.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shop.pojo.Users;
import com.shop.vo.UsersQueryRequest;
import com.shop.vo.UsersSaveRequest;
import com.shop.vo.UsersUpdateRequest;


import java.security.NoSuchAlgorithmException;
import java.util.Map;

/**
 * 用户表 
 *
 * @author yukangkang
 * @email sunlightcs@gmail.com
 * @date 2020-10-30 13:16:29
 */
public interface UsersService extends IService<Users> {

    IPage<Users> page(Page page, UsersQueryRequest request);

    void save(UsersSaveRequest request);

    void update(UsersUpdateRequest request);

    void delete(String id);

    /**
     * 判断用户名是否存在
     */
    public boolean queryUserNameIsExist(String username);

    /**
     * 创建用户
     */
    public Users createUser(UsersSaveRequest request) throws NoSuchAlgorithmException;


    public Users queryUserForLogin(String username,String password) throws NoSuchAlgorithmException;

}

